import request from '@/utils/request'

// 查询住院申请列表
export function listAdmission(query) {
  return request({
    url: '/system/admission/list',
    method: 'get',
    params: query
  })
}

// 查询住院申请详细
export function getAdmission(admissionId) {
  return request({
    url: '/system/admission/' + admissionId,
    method: 'get'
  })
}

// 新增住院申请
export function addAdmission(data) {
  return request({
    url: '/system/admission',
    method: 'post',
    data: data
  })
}

// 修改住院申请
export function updateAdmission(data) {
  return request({
    url: '/system/admission',
    method: 'put',
    data: data
  })
}

// 删除住院申请
export function delAdmission(admissionId) {
  return request({
    url: '/system/admission/' + admissionId,
    method: 'delete'
  })
}
